package com.yami.shop.bean.enums;

import lombok.Getter;

/**
 * 人脸设计稿订单支付方式枚举
 * @author AI Assistant
 */
@Getter
public enum FaceDesignPayTypeEnum {
    
    /**
     * 微信支付
     */
    WECHAT(1, "微信支付"),
    
    /**
     * 支付宝
     */
    ALIPAY(2, "支付宝"),
    
    /**
     * 余额支付
     */
    BALANCE(3, "余额支付");

    private final Integer value;
    private final String desc;

    FaceDesignPayTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    /**
     * 根据值获取枚举
     */
    public static FaceDesignPayTypeEnum valueOf(Integer value) {
        for (FaceDesignPayTypeEnum type : values()) {
            if (type.getValue().equals(value)) {
                return type;
            }
        }
        return null;
    }

    /**
     * 获取描述
     */
    public static String getDesc(Integer value) {
        FaceDesignPayTypeEnum type = valueOf(value);
        return type != null ? type.getDesc() : "未知方式";
    }
}